#pragma once
#include <vector>
#include <string>
#include <vulkan/vulkan_core.h>
#include "gfx-struct.h"

class GfxPass;
class GfxShader;


class GfxPipeline
{
private:
    GfxObjectTypeE _type;
    GfxPass *_pass;
    GfxShader *_shader;

    VkPipelineLayout _vkPipelineLayout;
    VkPipeline _vkPipeline;
    /**
     * @brief 管道
     */
    void _createPipeline();

    VkDescriptorSetLayout _descriptorSetLayout;
    /**
     * 初始化描述符集布局
     */
    void _createDescriptorSetLayout();


public:
    GfxPipeline(GfxObjectTypeE type, GfxShader *shader, GfxPass *pass);
    VkPipeline getVKPipeline();
    VkPipelineLayout getVKPipelineLayout();
    GfxPass *getPass();
    VkDescriptorSetLayout getDescriptorSetLayout();
    void clear();
    void reset();

    ~GfxPipeline();
};
